﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"  ValidateRequest ="false" 
    CodeFile="MailParamMaintain.aspx.vb" Inherits="WebForm_Manage_MailParamMaintain" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        function InsertText(text) {
            var oFckeditor = FCKeditorAPI.GetInstance('ctl00_ContentPlaceHolder1_tbcMain_DetailPanel_tbBody_tbCht_txtMailBody');
            oFckeditor.InsertHtml(text);
        }

        function InsertTextChn(text) {
            var oFckeditor = FCKeditorAPI.GetInstance('ctl00_ContentPlaceHolder1_tbcMain_DetailPanel_tbBody_tbSimplified_txtMailBodyChn');
            oFckeditor.InsertHtml(text);
        }
        function InsertTextEng(text) {
            var oFckeditor = FCKeditorAPI.GetInstance('ctl00_ContentPlaceHolder1_tbcMain_DetailPanel_tbBody_tbEnglish_txtMailBodyEng');
            oFckeditor.InsertHtml(text);
        } 
    </script>

    <table>
        <tr>
            <td colspan="2" style="text-align: center">
                <asp:Label ID="lblTitle" runat="server" meta:resourcekey="lblTitle" Font-Bold="True"
                    Font-Size="24px"></asp:Label>
            </td>
        </tr>
        <tr style="vertical-align: text-top">
            <td>
                <asp:HiddenField ID="hiUID" runat="server" />
                <asp:HiddenField ID="hiDBName" runat="server" />
            </td>
            <td>
                <asp:ObjectDataSource ID="DSMailParam" runat="server" SelectMethod="GetMailParam"
                    TypeName="AssetManage.BBL.MailParamBBL">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <ajaxToolkit:TabContainer ID="tbcMain" runat="server" ActiveTabIndex="0" 
                    Width="100%">
                    <ajaxToolkit:TabPanel ID="BrowsePanel" runat="server" meta:resourcekey="BrowsePanel">
                        <ContentTemplate>
                            <TServerControl:TGridView ID="gvBrowse" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                                AllowPaging="True" AutoGenerateColumns="False" DataSourceID="DSMailParam" ShowFooterWhenEmpty="False"
                                ShowHeaderWhenEmpty="False" SkinID="pager" TotalRowCount="0" Width="100%" PageSize="5">
                                <Columns>
                                    <asp:TemplateField meta:resourcekey="colDetail">
                                        <ItemTemplate>
                                            <asp:Button ID="btnDetail" CommandName="Detail" runat="server" meta:resourcekey="btnDetail"
                                                CommandArgument='<%# Bind("ParamID") %>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="ParamID">
                                        <ItemTemplate>
                                            <asp:Label ID="lblParamID" runat="server" Text='<%# Bind("ParamID") %>' Width="40px"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="ParamDesc">
                                        <ItemTemplate>
                                            <asp:Label ID="lblParamDesc" runat="server" Text='<%# Bind("ParamDesc") %>' Width="100px"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="MailSubject">
                                        <ItemTemplate>
                                            <asp:Label ID="lblMailSubject" runat="server" Text='<%# Bind("MailSubject") %>' Width="100px"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="MailBody">
                                        <ItemTemplate>
                                            <asp:Label ID="lblMailBody" runat="server" Text='<%# Bind("MailBody") %>' Width="300px"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField meta:resourcekey="ReturnDays">
                                        <ItemTemplate>
                                            <asp:Label ID="lblReturnDays" runat="server" Text='<%# Bind("ReturnDays") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </TServerControl:TGridView>
                        </ContentTemplate>
                    </ajaxToolkit:TabPanel>
                    <ajaxToolkit:TabPanel ID="DetailPanel" runat="server" meta:resourcekey="DetailPanel">
                        <ContentTemplate>
                            <asp:Button ID="btnSave" runat="server" meta:resourcekey="btnSave" Visible="False" />
                            <asp:Button ID="btnCancel" runat="server" meta:resourceKey="btnCancel" Visible="False" />
                            <asp:Button ID="btnInsert" runat="server" meta:resourceKey="btnInsert" />
                            <br />
                            <table border="1">
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="lblParamID1" runat="server" meta:resourceKey="lblParamID"></asp:Label>
                                    </td>
                                    <td align="left" colspan="5">
                                        <asp:Label ID="lblParamID" runat="server" Width="700px"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="lblParamDesc" runat="server" meta:resourceKey="lblParamDesc"></asp:Label>
                                    </td>
                                    <td align="left" colspan="5">
                                        <asp:TextBox ID="txtParamDesc" runat="server" Width="700px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="lblReturnDays" runat="server" meta:resourceKey="lblReturnDays" Width="80px"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtReturnDays" runat="server" Width="80px"></asp:TextBox>
                                    </td>
                                    <td align="right">
                                        <asp:Label ID="Label2" runat="server" meta:resourceKey="lblResendDays" Width="80px"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtResendDays" runat="server" Width="80px"></asp:TextBox>
                                    </td>
                                    <td align="right">
                                        <asp:Label ID="lblResendTimes" runat="server" meta:resourceKey="lblResendTimes" Width="80px"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtResendTimes" runat="server" Width="80px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="Label1" runat="server" Width="80px" meta:resourceKey="lblModiName"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblModiName" runat="server" Width="80px"></asp:Label>
                                    </td>
                                    <td align="right">
                                        <asp:Label ID="Label3" runat="server" Width="80px" meta:resourceKey="lblModiDate"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblModiDate" runat="server" Width="150px"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="6">
                                        <ajaxToolkit:TabContainer ID="tbBody" runat="server" ActiveTabIndex="0" CssClass="">
                                            <ajaxToolkit:TabPanel ID="tbCht" runat="server" meta:resourceKey="tbCht">
                                                <ContentTemplate>
                                                    <table>
                                                        <tr>
                                                            <td align="right">
                                                                <asp:Label ID="lblMailSubject" runat="server" meta:resourceKey="lblMailSubject"></asp:Label>
                                                            </td>
                                                            <td align="left">
                                                                <asp:TextBox ID="txtMailSubject" runat="server" Width="700px"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="center" colspan="6">
                                                                <asp:Button ID="btnModifyInfo" runat="server" meta:resourceKey="btnModifyInfo" OnClientClick="InsertText('&nbsp;&nbsp;|$|資料|$|&nbsp;&nbsp;');return false;" />
                                                                <asp:Panel ID="plTools" runat="server" Visible="False">
                                                                    <asp:Button ID="btnLink" runat="server" meta:resourceKey="btnLink" OnClientClick="InsertText('&nbsp;&nbsp;|$|連結|$|&nbsp;&nbsp;');return false;" />
                                                                    <asp:Button ID="btnReturn" runat="server" meta:resourceKey="btnReturn" OnClientClick="InsertText('&nbsp;&nbsp;|$|回報|$|&nbsp;&nbsp;');return false;" />
                                                                    <asp:Button ID="btnStatistics" runat="server" meta:resourceKey="btnStatistics" OnClientClick="InsertText('<br/>&nbsp;&nbsp;|$|統計|$|&nbsp;&nbsp;<br/>');return false;" />
                                                                    <asp:Button ID="btnReturnAll" runat="server" meta:resourceKey="btnReturnAll" OnClientClick="InsertText('&nbsp;&nbsp;|$|回報全部|$|&nbsp;&nbsp;');return false;" />
                                                                    <asp:Button ID="btnQuery" runat="server" meta:resourceKey="btnQuery" OnClientClick="InsertText('&nbsp;&nbsp;|$|查詢|$|&nbsp;&nbsp;');return false;" />
                                                                </asp:Panel>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="right">
                                                                <asp:Label ID="lblMailBody" runat="server" meta:resourceKey="lblMailBody"></asp:Label>
                                                            </td>
                                                            <td align="left" colspan="5">
                                                                <FCKeditorV2:FCKeditor ID="txtMailBody" runat="server" BasePath="~/FCKeditor/" Height="200px"
                                                                    Width="800px" ToolbarSet="ori_Default">
                                                                </FCKeditorV2:FCKeditor>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ContentTemplate>
                                            </ajaxToolkit:TabPanel>
                                            <ajaxToolkit:TabPanel ID="tbSimplified" runat="server" meta:resourcekey="tbsimplified">
                                                <ContentTemplate>
                                                    <table border="1">
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblMailsubjectSimplified" runat="server" meta:resourceKey="lblMailsubjectSimplified"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtMailsubjectSimplified" runat="server" Width="500px"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="center" colspan="2">
                                                                <asp:Button ID="Button1" runat="server" meta:resourceKey="btnModifyInfo" OnClientClick="InsertTextChn('&nbsp;&nbsp;|$|資料|$|&nbsp;&nbsp;');return false;" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblMailBodySimplified" runat="server" meta:resourceKey="lblMailBodySimplified"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <FCKeditorV2:FCKeditor ID="txtMailBodyChn" runat="server" BasePath="~/FCKeditor/"
                                                                    Height="200px" Width="800px" ToolbarSet="ori_Default">
                                                                </FCKeditorV2:FCKeditor>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ContentTemplate>
                                            </ajaxToolkit:TabPanel>
                                            <ajaxToolkit:TabPanel ID="tbEnglish" runat="server" meta:resourcekey="tbEnglish">
                                                <ContentTemplate>
                                                    <table border="1">
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblMailsubjectEng" runat="server" meta:resourceKey="lblMailsubjectEng"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtMailSubjectEng" runat="server" Width="500px"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="center" colspan="2">
                                                                <asp:Button ID="btnModiInfoEng" runat="server" meta:resourceKey="btnModifyInfo" OnClientClick="InsertTextEng('&nbsp;&nbsp;|$|資料|$|&nbsp;&nbsp;');return false;" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblMailBodyEng" runat="server" meta:resourceKey="lblMailBodyEng"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <FCKeditorV2:FCKeditor ID="txtMailBodyEng" runat="server" BasePath="~/FCKeditor/"
                                                                    Height="200px" Width="800px" ToolbarSet="ori_Default">
                                                                </FCKeditorV2:FCKeditor>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ContentTemplate>
                                            </ajaxToolkit:TabPanel>
                                        </ajaxToolkit:TabContainer>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajaxToolkit:TabPanel>
                </ajaxToolkit:TabContainer>
            </td>
        </tr>
    </table>
</asp:Content>
